package com.qianfeng.controller;

import com.qianfeng.entity.Category;
import com.qianfeng.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class CategoryController {
    @Autowired
    private CategoryService categoryService;

    @ResponseBody
    @RequestMapping("/getCategoryList")
    public List<Category> getCategoryList() {
        List<Category> categoryList1 = categoryService.getCategoryList();
        return categoryList1;

    }


}
